From f9a4c3e319c3572ada2e9d8131e4f303791ad2da Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 4 Apr 2007 11:16:13 +0100 Subject: [PATCH] hvm: hvm_io_assist() doesn't preoperly make use of its vcpu parameter. Remove it to make it obvious that it can only be called for the currently-executing vcpu. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/hvm/io.c | 3 ++- xen/arch/x86/hvm/platform.c | 4 ++-- xen/include/asm-x86/hvm/io.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 4af6b9e4da..735f32fc3f 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -131,7 +131,7 @@ void hvm_do_resume(struct vcpu *v) switch ( p->state ) { case STATE_IORESP_READY: /* IORESP_READY -> NONE */ - hvm_io_assist(v); + hvm_io_assist(); break; case STATE_IOREQ_READY: /* IOREQ_{READY,INPROCESS} -> IORESP_READY */ case STATE_IOREQ_INPROCESS: diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index 4bff30b2b9..23d62b4d35 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -764,13 +764,14 @@ static void hvm_mmio_assist(struct cpu_user_regs *regs, ioreq_t *p, } } -void hvm_io_assist(struct vcpu *v) +void hvm_io_assist(void) { vcpu_iodata_t *vio; ioreq_t *p; struct cpu_user_regs *regs; struct hvm_io_op *io_opp; unsigned long gmfn; + struct vcpu *v = current; struct domain *d = v->domain; io_opp = &v->arch.hvm_vcpu.io_op; diff --git a/xen/arch/x86/hvm/platform.c b/xen/arch/x86/hvm/platform.c index d8a751bd1d..0862da2753 100644 --- a/xen/arch/x86/hvm/platform.c +++ b/xen/arch/x86/hvm/platform.c @@ -865,7 +865,7 @@ void send_pio_req(unsigned long port, unsigned long count, int size, if ( hvm_portio_intercept(p) ) { p->state = STATE_IORESP_READY; - hvm_io_assist(v); + hvm_io_assist(); return; } @@ -914,7 +914,7 @@ static void send_mmio_req(unsigned char type, unsigned long gpa, if ( hvm_mmio_intercept(p) || hvm_buffered_io_intercept(p) ) { p->state = STATE_IORESP_READY; - hvm_io_assist(v); + hvm_io_assist(); return; } diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/asm-x86/hvm/io.h index cf46b0cb6d..c0663ccb0d 100644 --- a/xen/include/asm-x86/hvm/io.h +++ b/xen/include/asm-x86/hvm/io.h @@ -149,7 +149,7 @@ extern void send_pio_req(unsigned long port, unsigned long count, int size, void send_timeoffset_req(unsigned long timeoff); extern void handle_mmio(unsigned long gpa); extern void hvm_interrupt_post(struct vcpu *v, int vector, int type); -extern void hvm_io_assist(struct vcpu *v); +extern void hvm_io_assist(void); #endif /* __ASM_X86_HVM_IO_H__ */ -- 2.30.2